param 
  ( $ProductName=$(Throw 'ProductName is required')
  , $BuildNumber=$(Throw 'BuildNumber is required')
  , $EnvironmentCode=$(Throw 'EnvironmentCode is required')
  )

$DBServer = "ProjectDashboardDB"
$Catalog = "ProjectDashboard"

$connection = new-object "System.Data.SqlClient.SqlConnection" 
$connection.ConnectionString = "Server=$DBServer;Database=$Catalog;Integrated Security=True"
$connection.Open()

$query = "CreateDeploymentEvent '$BuildNumber', '$ProductName', '$EnvironmentCode', 'true'"

$cmd = New-Object System.Data.SqlClient.SqlCommand( $query, $connection )

$reader = $cmd.ExecuteNonQuery()
#example use
#.\Create-DashboardDeploymentEvent.ps1 -ProductName eCare_ProductionSupport -BuildNumber $Version -EnvironmentCode ITEST01